package org.fffd.l23o6.util.qrCode;
import cn.hutool.extra.qrcode.QrCodeUtil;

import java.io.File;

public class Qrcode {

    public static String generate(String name, String content) {

        String path = "../../train_ticket_fronted/src/assets/qrCodeImg/"+name+".jpg";
        File file = new File(path);
        // 生成指定url对应的二维码到文件，宽和高都是300像素
        QrCodeUtil.generate(content, 300, 300, file);

        return path;
    }
}

